import {createBrowserRouter} from 'react-router-dom'
import { lazy } from 'react'

const Home=lazy(()=>import('../path/home/Index'))
const Eniter=lazy(()=>import('../path/eniter/Index'))
const Look=lazy(()=>import('../path/look/Index'))
const Search=lazy(()=>import('../path/search/Index'))
const Data=lazy(()=>import('../path/data/Index'))
const Resigate=lazy(()=>import('../path/resigate/Index'))
const Login=lazy(()=>import('../path/login/Index'))
const Detail=lazy(()=>import('../path/detail/Index'))
const Detail2=lazy(()=>import('../path/detail2/Index'))
const EniterDetail=lazy(()=>import('../path/eniterDetail/Index'))
const App=lazy(()=>import('../App'))
const Eve=lazy(()=>import('../Eve'))

const routes=[
    {
        path:'/home',
        element:<Home />,
    },
    {
        path:'/look',
        element:<Look />
    },
    {
        path:'/eniter',
        element:<Eniter />
    },
]
const router=createBrowserRouter([
    {
        path:"/",
        element:<Eve />,
        // children:routes
    },
    {
        path:"/",
        element:<App />,
        children:routes
    },
    {
        path:'/login',
        element:<Login />
    },
    {
        path:'/resigate',
        element:<Resigate />
    },
    {
        path:'/search',
        element:<Search />
    },
    {
        path:'/data',
        element:<Data />
    },
    {
        path:'/detail/:id',
        element:<Detail />
    },
    {
        path:'/detail2/:id',
        element:<Detail2 />
    },
    {
        path:'/eniterDetail/:id',
        element:<EniterDetail />
    },
])
export default router